/*
 * Copyright (C) 2010 Imavis Srl
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.imavis.avimuxer;

import java.io.File;
import java.io.IOException;

/**
 * Configures and creates a "raw" muxer.
 * <p>
 * A drop-in replacement for {@link AviMuxerBuilder} that creates a
 * {@link Muxer} instance that writes media data to the output file unchanged.
 * <p>
 * This class is immutable.
 *
 * @author Andrea Gualano
 */
public final class RawMuxerBuilder implements MuxerBuilder {
    /**
     * Creates a raw muxer instance.
     * <p>
     * This method creates a new {@link Muxer} object that writes all data
     * directly to the output file, unchanged, without any container format.
     *
     * @param file the output file
     * @return an open raw {@link Muxer}
     * @throws IOException if an I/O error occurs
     */
    @Override
    public Muxer open(File file) throws IOException {
        return new RawMuxer(file);
    }
}
